In video compression, a key frame, also known as an intra-frame (I-frame), is a frame in which a complete image is stored in the data stream. In video compression, only changes that occur between frames are stored in the data stream in order to greatly reduce the amount of information that must be stored. This technique capitalizes on the fact that most video sources (such as a typical movie) have only small changes in the image from one frame to the next. However, whenever a drastic change to the image occurs, such as when switching from one camera shot to another, or at a scene change, a key frame is created. The entire image for the frame is stored as a key frame when the visual difference between the two frames is so great that representing the new image incrementally from the previous frame would be more complex and would require even more bits than reproducing the whole image.
Because video compression only stores incremental changes between frames (except for key frames), it is not possible to fast forward or rewind to any arbitrary spot in the video stream without the decoder having access to the key frame. This is because the data for a given frame may represent only how that frame differs from the preceding frame. For that reason it is beneficial to include key frames at arbitrary intervals while encoding video. For example, a key frame may be output once for every ten seconds of video, even though the video image does not change enough visually to warrant the automatic creation of the key frame. This allows seeking within the video stream at a minimum of ten second intervals. The downside to this approach is that the resulting video stream is larger in size because many key frames exist that are not necessary for the visual representation of the frame during normal playback. Further, a user cannot seek to an arbitrary frame in the video and see a complete image if the frame is not a key frame. What is needed, then, are techniques to access complete image frames at locations in a video other than key frames.